#include <algorithm>
#include <iostream>
using namespace std;

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  for (cin >> T; T; T--) {
    int n, ans = 1;

    for (cin >> n; n; n--) {
      int a;
      cin >> a;
      ans = max(a, ans);
    }
    cout << ans << "\n";
  }
  return 0;
}